package com.xidata.dict.demo.db;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class MenuItem {
    String code;
    String name;

    List<MenuItem> subMenus = new ArrayList<>();

    public void add(MenuItem menuItem) {
        subMenus.add(menuItem);
    }

    public MenuItem(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public MenuItem() {
    }
}
